package com.sc.nft.admin.request;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.entity.dto.AddActivityPropsConfDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;


@Data
public class UpdateActivityPropsRequest extends IdRequest {

    @ApiModelProperty("品牌id")
    private Long daoId;

    @ApiModelProperty("权益道具id")
    @NotNull(message = "权益道具id不能为空")
    private Long equityPropsId;

    @ApiModelProperty("缩略图")
    private String creationContent;

    @ApiModelProperty("总数量")
    @NotNull(message = "总数量不能为空")
    @Min(value = 1, message = "最小不能小于1")
    private Integer sumCount;

    @ApiModelProperty("参与对象持有NFTid")
    private Long relationId;

    @ApiModelProperty("参与对象持有NFT名称")
    private String relationName;

    @ApiModelProperty("兑换条件")
    @Valid
    private List<AddActivityPropsConfDTO> confList;

    @ApiModelProperty("兑换上限")
    @NotNull(message = "兑换上限不能为空")
    private Integer upperLimit;

    @ApiModelProperty("是否开启注册时间限制")
    @NotNull(message = "是否开启注册时间限制不能为空")
    private Boolean isRegisterTime;

    @ApiModelProperty("注册开始时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date registerBeginTime;

    @ApiModelProperty("注册结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date registerEndTime;
}